package com.ypinkj.app.mapper;

import com.ypinkj.app.entity.CompanyInformationPerfection;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author LF
 * @since 2020-10-20
 */
@Mapper
public interface CompanyInformationPerfectionMapper extends BaseMapper<CompanyInformationPerfection> {

    @Update("<script>" +
            " update company_information_perfection" +
            " <set>" +
            " <if test='cominfo.company_scale != null'>" +
            "  company_scale = #{cominfo.company_scale}," +
            " </if>" +
            " <if test='cominfo.company_nature != null'>" +
            "  company_nature=#{cominfo.company_nature}," +
            " </if>" +
            " <if test='cominfo.company_industry != null'>" +
            "  company_industry=#{cominfo.company_industry}," +
            " </if>" +
            " <if test='cominfo.company_logo != null'>" +
            "  company_logo=#{cominfo.company_logo}," +
            " </if>" +
            " <if test='cominfo.company_id != null'>" +
            "  company_id=#{cominfo.company_id}," +
            " </if>" +
            " </set>" +
            " where id =" +
            " #{cominfo.id}" +
            " </script>")
    int updateInfo(@Param("cominfo")CompanyInformationPerfection cominfo);
}
